#define _CRT_SECURE_NO_WARNINGS


#include<iostream>

using namespace std;

const int N = 1e7 + 10;
int arr[N];
int n, x;

int main()
{
    cin >> n >> x;
    for (int i = 1; i <= n; i++) { cin >> arr[i]; }
    int left = 1, right = 1, sum = 0;
    int retl = -1, retr = -1, retLen = N;
    while (right <= n)
    {
        sum += arr[right];
        while (sum >= x)
        {
            if (retLen > right - left)
            {
                retl = left;
                retr = right;
                retLen = right - left;
            }
            sum -= arr[left++];
        }
        ++right;
    }
    cout << retl << " " << retr;
    return 0;
}